'''
Created on 16/10/2011

@author: nacho
'''

from instruction import Instruction


class CPUInstruction(Instruction):
    '''
    classdocs
    '''


    def __init__(self, execu, burst = 1):
        '''
        Constructor
        '''
        
        self.burst = burst
        self.executable = execu #ES UNA FUNCION!!!
        
        
    def execute(self, cpu): 
        
        self.burst -= 1
        self.executable(cpu)
        
    def exe(self):
        
        return self.executable
        
        
    def needCPU(self):
        
        return True
        
    def decreaseBurst(self):
        
        self.burst -= 1

    